/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
 * Copyright (C) 2005 Novell, Inc.
 *
 * Nautilus is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * Nautilus is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; see the file COPYING.  If not,
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Anders Carlsson <andersca@imendio.com>
 *
 */

#ifndef CREDENZA_QUERY_H
#define CREDENZA_QUERY_H

#include <glib-object.h>

#define CREDENZA_TYPE_QUERY		(credenza_query_get_type ())
#define CREDENZA_QUERY(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), CREDENZA_TYPE_QUERY, CredenzaQuery))
#define CREDENZA_QUERY_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), CREDENZA_TYPE_QUERY, CredenzaQueryClass))
#define CREDENZA_IS_QUERY(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CREDENZA_TYPE_QUERY))
#define CREDENZA_IS_QUERY_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), CREDENZA_TYPE_QUERY))
#define CREDENZA_QUERY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), CREDENZA_TYPE_QUERY, CredenzaQueryClass))

typedef struct CredenzaQueryDetails CredenzaQueryDetails;

typedef struct CredenzaQuery {
	GObject parent;
	CredenzaQueryDetails *details;
} CredenzaQuery;

typedef struct {
	GObjectClass parent_class;
} CredenzaQueryClass;

GType          credenza_query_get_type (void);
gboolean       credenza_query_enabled  (void);

CredenzaQuery* credenza_query_new      (void);

char *         credenza_query_get_text           (CredenzaQuery *query);
void           credenza_query_set_text           (CredenzaQuery *query, const char *text);

char *         credenza_query_get_location       (CredenzaQuery *query);
void           credenza_query_set_location       (CredenzaQuery *query, const char *uri);

GList *        credenza_query_get_mime_types     (CredenzaQuery *query);
void           credenza_query_set_mime_types     (CredenzaQuery *query, GList *mime_types);
void           credenza_query_add_mime_type      (CredenzaQuery *query, const char *mime_type);

char *         credenza_query_to_readable_string (CredenzaQuery *query);
CredenzaQuery *credenza_query_load               (char *file);
gboolean       credenza_query_save               (CredenzaQuery *query, char *file);

#endif /* CREDENZA_QUERY_H */
